//
// Created by kepeiyang on 2021/3/10.
//

#ifndef SERVICE_TASKDAO_H
#define SERVICE_TASKDAO_H

#include <iostream>
#include <string>
#include <list>
#include <data/PlayerBean.h>

#include "TaskBean.h"

using std::string;
using std::list;

class TaskDao {
private:
    TaskDao();
    ~TaskDao();

    static TaskDao *sInstance;
public:
    static TaskDao* getInstance();
    void getTask(string taskid, TaskBean &RetTask);
    void getPlayerTaskList(string sid, list<PlayerTaskBean> &RetTaskList);
    bool getPlayerTaskOnce(string sid, string taskid, PlayerTaskBean &RetTaskList);

    bool addPlayerTask(string sid, TaskBean task);

    bool updateTaskStatus(string sid, string taskid, string taskStatus, int taskOver);
};


#endif //SERVICE_TASKDAO_H
